﻿//-----------------------------------------------------------------------
// <copyright file="HistoryViewMode.cs" company="Redmist">
//     Copyright (c) Damien T Smith. All rights reserved.
// </copyright>
// <author>Damien Smith</author>
//-----------------------------------------------------------------------

namespace Redmist.UsageMonitor.Model
{
    using System.Collections.Generic;

    /// <summary>Contains history view and a description used as a data source for a combo box.</summary>
    public class HistoryViewMode
    {
        /// <summary>Initializes a new instance of the HistoryViewMode class.</summary>
        /// <param name="historyView">A Redmist.UsageMonitor.Model.HistoryView representing a usage history graph view.</param>
        /// <param name="historyViewDescription">A System.String representing a description of a history graph view type.</param>
        public HistoryViewMode(HistoryView historyView, string historyViewDescription)
        {
            this.HistoryView = historyView;
            this.HistoryViewDescription = historyViewDescription;
        }

        /// <summary>Gets a Redmist.UsageMonitor.Model.HistoryView representing a graph history view type.</summary>
        public HistoryView HistoryView { get; private set; }

        /// <summary>Gets a System.String representing a graph history view description.</summary>
        public string HistoryViewDescription { get; private set; }

        /// <summary>Creates a list of graph history view modes.</summary>
        /// <returns>A System.Collections.Generic.IList of Redmist.UsageMonitor.Model.HistoryViewMode representing a list of graph history view modes.</returns>
        public static IList<HistoryViewMode> CreateHistoryViewList()
        {
            IList<HistoryViewMode> historyViewList = new List<HistoryViewMode>();
            historyViewList.Add(new HistoryViewMode(HistoryView.Peak, "Peak"));
            historyViewList.Add(new HistoryViewMode(HistoryView.OffPeak, "Off Peak"));
            historyViewList.Add(new HistoryViewMode(HistoryView.Combined, "Combined"));
            return historyViewList;
        }
    }
}
